Metamodeling semantics of multiple inheritance

نویسندگان

  • Roland Ducournau
  • Jean Privat
چکیده

Inheritance provides object-oriented programming with much of its great reusability power. When inheritance is single, its specifications are simple and everybody roughly agrees on them. On the contrary, multiple inheritance yields ambiguities that have prompted long-standing debates and no two languages agree on its specifications. In this paper, we present a semantics of multiple inheritance based on meta-modeling. A metamodel is proposed which distinguishes the “identity” of properties from their “values” or “implementations”. It yields a clear separation between syntactic and semantic conflicts. The former can be solved in any language at the expense of a common syntactic construct, namely full name qualification. However, semantic conflicts require a programmer’s decision and the programming language must help the programmer to some extent. This paper surveys the approach based on linearizations, which has been studied in-depth, and proposes some extensions. As it turns out that only static typing takes full advantage of the metamodel, the interaction between multiple inheritance and static typing is also considered, especially in the context of virtual types. The solutions proposed by the various languages with multiple inheritance are compared with the metamodel results. Throughout the paper, difficulties encountered under the open world assumption are stressed.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Building a Kermeta Compiler using Scala: an Experience Report

This paper presents an experience report of building a Kermeta compiler using Scala as a target language. Kermeta is a domain specific language inspired by languages such as Eiffel or OCL for specifying the operational semantics of metamodels. This engineering work, initially motivated by performance issues of our Kermeta interpreter, is an excuse to study and discuss some paradigm mismatches b...

متن کامل

A Meta-modeling Semantics of Multiple Inheritance

Inheritance affords to object-oriented programming its great powers of reusability. When inheritance is single, its specifications are simple and everybody roughly agree with them. On the contrary, multiple inheritance yields ambiguities that have provoked long-lasting debates and there are no two languages which agree on its specifications. In this paper, we present a semantics of multiple inh...

متن کامل

A Unifying Semantic Framework for Multilevel Metamodeling

As the revision process of UML attempts to re-architecture the single and imprecise language into a family of languages with well–defined semantics, the nature of the core metamodeling framework is of growing importance. In the current paper, a formal mathematical background is presented for a uniform representation of multilevel metamodels and static well–formedness constraints supported by a ...

متن کامل

Dimensions and Dichotomy in Metamodeling

Syntax: An abstract description of the entities that form a model of the respective language. Static Semantics (context conditions, constraints) : Well-formedness conditions between the syntactic entities, such as absence of circular inheritance. Dynamic Semantics (denotation): The (operational) behavior of the entities of the speci cation, such as I/O, reaction to stimuli, e ect of executing a...

متن کامل

Object Inheritance Without Classes (Artifact)

This artifact is a PLT Redex implementation of the operational semantics presented in Object Inheritance Without Classes. It defines the core syntax and runtime semantics of the Graceless language, and then extends it in multiple different ways to produce the various implementations of object inheritance, including single and multiple inheritance. The implementation makes the semantics runnable...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Sci. Comput. Program.

دوره 76  شماره 

صفحات  -

تاریخ انتشار 2011